package com.shuyun.springmvc.showcase.controlleradvice;

import com.shuyun.springmvc.showcase.annotation.DemoObj;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by feng.ding on 2017/1/4.
 */
@Controller
public class AdviceController {

    @RequestMapping("/advice")
    public String getSomething(@ModelAttribute("msg") String msg, DemoObj obj){
        throw new IllegalArgumentException("参数有误/" + "来自@ModelAttribute：" + msg);
    }
}
